package com.wcar.store.controller;

import com.wcar.common.entity.CarStore;
import com.wcar.common.vo.Result;
import com.wcar.store.service.CarService;
import com.wcar.store.vo.BindPlusVo;
import com.wcar.store.vo.BindVo;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/**
 * @BelongsProject: four-wcar-idea
 * @BelongsPackage: com.wcar.store.controller
 * @Author: 李睢康
 * @CreateTime: 2024-06-04  16:12
 */
@RestController
@RequestMapping("/store/bindcar")
public class BindCarController {
    @Resource
    private CarService carService;
    @PostMapping("/api/bingCar")
    public Result<Integer> insert(@RequestBody BindVo bindVo){
        return carService.insert(bindVo);
    }
    @PostMapping("/api/selectBindCar")
    public Result<List<CarStore>> findByStoreId(@RequestBody BindPlusVo bindPlusVo){
        return carService.selectByStoreId(bindPlusVo);
    }
}
